/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 19/10/2009, 16:24:33
 */

package projeto;

/**
 *
 * @author Ricardo
 */
public class Principal extends javax.swing.JFrame {

    /** Creates new form Principal */
    public Principal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPanePesquisa = new javax.swing.JLayeredPane();
        jComboBoxOpcoes = new javax.swing.JComboBox();
        jButtonPesquisar = new javax.swing.JButton();
        jTextFieldPesquisar = new javax.swing.JTextField();
        jTabbedPaneResultadoPesquisa = new javax.swing.JTabbedPane();
        jPanelResultadoPesquisa = new javax.swing.JPanel();
        jScrollPaneResultadoPesquisa = new javax.swing.JScrollPane();
        jTableResultadoPesquisa = new javax.swing.JTable();
        jLabelSubTitulo = new javax.swing.JLabel();
        jPanelUpload = new javax.swing.JPanel();
        jScrollPaneUpload = new javax.swing.JScrollPane();
        jTableUpload = new javax.swing.JTable();
        jLabelSubTitulo3 = new javax.swing.JLabel();
        jLabelVelGeralUpload = new javax.swing.JLabel();
        jLabelNumVelGeralUpload = new javax.swing.JLabel();
        jLabelUnidadeUp = new javax.swing.JLabel();
        jPanelDownload = new javax.swing.JPanel();
        jScrollPaneDownload = new javax.swing.JScrollPane();
        jTableDownload = new javax.swing.JTable();
        jLabelSubTitulo2 = new javax.swing.JLabel();
        jButtonPausar = new javax.swing.JButton();
        jButtonCancelar = new javax.swing.JButton();
        jLabelNumVelGeralDownload = new javax.swing.JLabel();
        jLabelVelGeralDownload = new javax.swing.JLabel();
        jLabelUnidadeDown = new javax.swing.JLabel();
        jButtonPausar1 = new javax.swing.JButton();
        jPanelChat = new javax.swing.JPanel();
        jButtonEnviar = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextAreaTexto = new javax.swing.JTextArea();
        jSeparatorChat = new javax.swing.JSeparator();
        jScrollPanePeerOnline = new javax.swing.JScrollPane();
        jListPeerOnline = new javax.swing.JList();
        jLabelPeerOnline = new javax.swing.JLabel();
        jLabelConexao = new javax.swing.JLabel();
        jLabelStatus = new javax.swing.JLabel();
        jSeparatorInfo = new javax.swing.JSeparator();
        jLabelNumHops = new javax.swing.JLabel();
        jLabelHops = new javax.swing.JLabel();
        jLabelNumHits = new javax.swing.JLabel();
        jLabelHits = new javax.swing.JLabel();
        jLabelPeer = new javax.swing.JLabel();
        jLabelNumPeer = new javax.swing.JLabel();
        jLabelTitulo = new javax.swing.JLabel();
        jLabelLogoGSnake = new javax.swing.JLabel();
        jLabelGnutella = new javax.swing.JLabel();
        jLabelSnake = new javax.swing.JLabel();
        menuBar = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLayeredPanePesquisa.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(51, 204, 255), new java.awt.Color(51, 51, 255), java.awt.Color.blue, new java.awt.Color(0, 153, 255)));

        jComboBoxOpcoes.setBackground(new java.awt.Color(0, 204, 204));
        jComboBoxOpcoes.setFont(new java.awt.Font("Comic Sans MS", 0, 18)); // NOI18N
        jComboBoxOpcoes.setForeground(new java.awt.Color(0, 0, 255));
        jComboBoxOpcoes.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Todos", "Áudio", "Vídeo", "Imagem", "Software", "Documento" }));
        jComboBoxOpcoes.setBounds(29, 30, 120, 40);
        jLayeredPanePesquisa.add(jComboBoxOpcoes, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jButtonPesquisar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/Search2.png"))); // NOI18N
        jButtonPesquisar.setToolTipText("Pesquisar");
        jButtonPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPesquisarActionPerformed(evt);
            }
        });
        jButtonPesquisar.setBounds(390, 20, 150, 70);
        jLayeredPanePesquisa.add(jButtonPesquisar, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextFieldPesquisar.setFont(new java.awt.Font("Comic Sans MS", 0, 18));
        jTextFieldPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldPesquisarActionPerformed(evt);
            }
        });
        jTextFieldPesquisar.setBounds(160, 30, 227, 40);
        jLayeredPanePesquisa.add(jTextFieldPesquisar, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTabbedPaneResultadoPesquisa.setFont(new java.awt.Font("Comic Sans MS", 0, 14)); // NOI18N

        jPanelResultadoPesquisa.setBackground(new java.awt.Color(227, 240, 240));

        jTableResultadoPesquisa.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jTableResultadoPesquisa.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nome", "Tamanho", "Velocidade", "Progresso", "Tempo Estimado", "Tamanho Restante", "Source", "Peer", "Data de Publicação", "Data de Publicação"
            }
        ));
        jTableResultadoPesquisa.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPaneResultadoPesquisa.setViewportView(jTableResultadoPesquisa);

        jLabelSubTitulo.setForeground(new java.awt.Color(0, 204, 0));
        jLabelSubTitulo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/escrito60.png"))); // NOI18N
        jLabelSubTitulo.setToolTipText("");

        javax.swing.GroupLayout jPanelResultadoPesquisaLayout = new javax.swing.GroupLayout(jPanelResultadoPesquisa);
        jPanelResultadoPesquisa.setLayout(jPanelResultadoPesquisaLayout);
        jPanelResultadoPesquisaLayout.setHorizontalGroup(
            jPanelResultadoPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelResultadoPesquisaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPaneResultadoPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 762, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelResultadoPesquisaLayout.createSequentialGroup()
                .addContainerGap(628, Short.MAX_VALUE)
                .addComponent(jLabelSubTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanelResultadoPesquisaLayout.setVerticalGroup(
            jPanelResultadoPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelResultadoPesquisaLayout.createSequentialGroup()
                .addComponent(jLabelSubTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26)
                .addComponent(jScrollPaneResultadoPesquisa, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
                .addGap(98, 98, 98))
        );

        jTabbedPaneResultadoPesquisa.addTab("Resultado da Pesquisa", jPanelResultadoPesquisa);

        jPanelUpload.setBackground(new java.awt.Color(239, 250, 239));

        jTableUpload.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nome", "Tamanho", "Porcentagem Transferida", "Velocidade Upload"
            }
        ));
        jScrollPaneUpload.setViewportView(jTableUpload);

        jLabelSubTitulo3.setForeground(new java.awt.Color(0, 204, 0));
        jLabelSubTitulo3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/escrito60.png"))); // NOI18N
        jLabelSubTitulo3.setToolTipText("");

        jLabelVelGeralUpload.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
        jLabelVelGeralUpload.setForeground(new java.awt.Color(0, 102, 0));
        jLabelVelGeralUpload.setText("Velocidade Geral Upload:");

        jLabelNumVelGeralUpload.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelNumVelGeralUpload.setText("12");

        jLabelUnidadeUp.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelUnidadeUp.setText("kps");

        javax.swing.GroupLayout jPanelUploadLayout = new javax.swing.GroupLayout(jPanelUpload);
        jPanelUpload.setLayout(jPanelUploadLayout);
        jPanelUploadLayout.setHorizontalGroup(
            jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelUploadLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(jScrollPaneUpload, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 158, Short.MAX_VALUE)
                .addComponent(jLabelSubTitulo3, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanelUploadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelVelGeralUpload)
                .addGap(23, 23, 23)
                .addComponent(jLabelNumVelGeralUpload)
                .addGap(18, 18, 18)
                .addComponent(jLabelUnidadeUp)
                .addContainerGap(534, Short.MAX_VALUE))
        );
        jPanelUploadLayout.setVerticalGroup(
            jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelUploadLayout.createSequentialGroup()
                .addGroup(jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelSubTitulo3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanelUploadLayout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addComponent(jScrollPaneUpload, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelVelGeralUpload)
                    .addComponent(jLabelUnidadeUp)
                    .addComponent(jLabelNumVelGeralUpload))
                .addContainerGap())
        );

        jTabbedPaneResultadoPesquisa.addTab("Upload", jPanelUpload);

        jPanelDownload.setBackground(new java.awt.Color(230, 230, 250));

        jTableDownload.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nome", "Tamanho", "Porcentagem Transferida", "Velocidade Download"
            }
        ));
        jScrollPaneDownload.setViewportView(jTableDownload);

        jLabelSubTitulo2.setForeground(new java.awt.Color(0, 204, 0));
        jLabelSubTitulo2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/escrito60.png"))); // NOI18N
        jLabelSubTitulo2.setToolTipText("");

        jButtonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/ksnake_pausa_32.png"))); // NOI18N
        jButtonPausar.setText("     Pausar Download(s)");
        jButtonPausar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPausarActionPerformed(evt);
            }
        });

        jButtonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/ksnake_cancel_32.png"))); // NOI18N
        jButtonCancelar.setText("  Cancelar Download(s)");

        jLabelNumVelGeralDownload.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelNumVelGeralDownload.setText("12");

        jLabelVelGeralDownload.setFont(new java.awt.Font("Comic Sans MS", 1, 14));
        jLabelVelGeralDownload.setForeground(new java.awt.Color(0, 51, 153));
        jLabelVelGeralDownload.setText("Velocidade Geral Download:");

        jLabelUnidadeDown.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelUnidadeDown.setText("kps");

        jButtonPausar1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/ksnake_continuar_32.png"))); // NOI18N
        jButtonPausar1.setText("Continuar Download(s)");

        javax.swing.GroupLayout jPanelDownloadLayout = new javax.swing.GroupLayout(jPanelDownload);
        jPanelDownload.setLayout(jPanelDownloadLayout);
        jPanelDownloadLayout.setHorizontalGroup(
            jPanelDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDownloadLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(jScrollPaneDownload, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(71, 71, 71)
                .addGroup(jPanelDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonPausar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonCancelar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonPausar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(72, 72, 72))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDownloadLayout.createSequentialGroup()
                .addContainerGap(628, Short.MAX_VALUE)
                .addComponent(jLabelSubTitulo2, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanelDownloadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelVelGeralDownload)
                .addGap(23, 23, 23)
                .addComponent(jLabelNumVelGeralDownload)
                .addGap(18, 18, 18)
                .addComponent(jLabelUnidadeDown)
                .addContainerGap(517, Short.MAX_VALUE))
        );
        jPanelDownloadLayout.setVerticalGroup(
            jPanelDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDownloadLayout.createSequentialGroup()
                .addComponent(jLabelSubTitulo2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDownloadLayout.createSequentialGroup()
                        .addComponent(jButtonPausar)
                        .addGap(18, 18, 18)
                        .addComponent(jButtonPausar1)
                        .addGap(18, 18, 18)
                        .addComponent(jButtonCancelar)
                        .addGap(24, 24, 24))
                    .addGroup(jPanelDownloadLayout.createSequentialGroup()
                        .addComponent(jScrollPaneDownload, javax.swing.GroupLayout.PREFERRED_SIZE, 304, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGap(27, 27, 27)
                .addGroup(jPanelDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelVelGeralDownload)
                    .addComponent(jLabelUnidadeDown)
                    .addComponent(jLabelNumVelGeralDownload))
                .addContainerGap())
        );

        jTabbedPaneResultadoPesquisa.addTab("Download", jPanelDownload);

        jPanelChat.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Chat", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Papyrus", 3, 18), new java.awt.Color(0, 102, 255))); // NOI18N

        jButtonEnviar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/ksnake_send_32.png"))); // NOI18N
        jButtonEnviar.setText("Enviar");
        jButtonEnviar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEnviarActionPerformed(evt);
            }
        });

        jTextAreaTexto.setColumns(20);
        jTextAreaTexto.setRows(5);
        jScrollPane2.setViewportView(jTextAreaTexto);

        jListPeerOnline.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPanePeerOnline.setViewportView(jListPeerOnline);

        jLabelPeerOnline.setForeground(new java.awt.Color(0, 204, 0));
        jLabelPeerOnline.setText("Peer Online");

        javax.swing.GroupLayout jPanelChatLayout = new javax.swing.GroupLayout(jPanelChat);
        jPanelChat.setLayout(jPanelChatLayout);
        jPanelChatLayout.setHorizontalGroup(
            jPanelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelChatLayout.createSequentialGroup()
                .addGroup(jPanelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelChatLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jSeparatorChat, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                            .addGroup(jPanelChatLayout.createSequentialGroup()
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButtonEnviar, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanelChatLayout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addComponent(jLabelPeerOnline)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPanePeerOnline, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanelChatLayout.setVerticalGroup(
            jPanelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelChatLayout.createSequentialGroup()
                .addGroup(jPanelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPanePeerOnline, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelPeerOnline))
                .addGap(17, 17, 17)
                .addComponent(jSeparatorChat, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane2, 0, 0, Short.MAX_VALUE)
                    .addComponent(jButtonEnviar, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jLabelConexao.setFont(new java.awt.Font("Comic Sans MS", 1, 14));
        jLabelConexao.setForeground(new java.awt.Color(0, 51, 153));
        jLabelConexao.setText("Conexão:");

        jLabelStatus.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelStatus.setText("Conectado");

        jLabelNumHops.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelNumHops.setText("12");

        jLabelHops.setFont(new java.awt.Font("Comic Sans MS", 1, 14));
        jLabelHops.setForeground(new java.awt.Color(0, 51, 153));
        jLabelHops.setText("Hops:");

        jLabelNumHits.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelNumHits.setText("13");

        jLabelHits.setFont(new java.awt.Font("Comic Sans MS", 1, 14));
        jLabelHits.setForeground(new java.awt.Color(0, 51, 153));
        jLabelHits.setText("Hits:");

        jLabelPeer.setFont(new java.awt.Font("Comic Sans MS", 1, 14));
        jLabelPeer.setForeground(new java.awt.Color(0, 51, 153));
        jLabelPeer.setText("Peer:");

        jLabelNumPeer.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabelNumPeer.setText("13");

        jLabelTitulo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/escrito.png"))); // NOI18N

        jLabelLogoGSnake.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/LOGO_GSnake_P2P_286.png"))); // NOI18N

        jLabelGnutella.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
        jLabelGnutella.setForeground(new java.awt.Color(0, 51, 153));
        jLabelGnutella.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/gnutella32.png"))); // NOI18N

        jLabelSnake.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
        jLabelSnake.setForeground(new java.awt.Color(0, 51, 153));
        jLabelSnake.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/ksnake32.png"))); // NOI18N

        jMenu1.setText("Arquivo");
        jMenu1.setFont(new java.awt.Font("Segoe UI", 0, 18));

        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem3.setFont(new java.awt.Font("Segoe UI", 0, 18));
        jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ícone/ksnake_exit_32.png"))); // NOI18N
        jMenuItem3.setText("Sair");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        menuBar.add(jMenu1);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparatorInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 1207, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(61, 61, 61)
                .addComponent(jLabelConexao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelStatus)
                .addGap(141, 141, 141)
                .addComponent(jLabelHops)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelNumHops)
                .addGap(191, 191, 191)
                .addComponent(jLabelHits)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelNumHits)
                .addGap(192, 192, 192)
                .addComponent(jLabelPeer, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelNumPeer)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 166, Short.MAX_VALUE)
                .addComponent(jLabelGnutella)
                .addGap(27, 27, 27)
                .addComponent(jLabelSnake)
                .addGap(45, 45, 45))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(260, 260, 260)
                        .addComponent(jLabelTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(153, 153, 153)
                        .addComponent(jLayeredPanePesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 563, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(jTabbedPaneResultadoPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 797, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addComponent(jLabelLogoGSnake, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(52, 52, 52)
                        .addComponent(jPanelChat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(39, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabelTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(jLayeredPanePesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(134, 134, 134))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelLogoGSnake)
                        .addGap(30, 30, 30)))
                .addGap(4, 4, 4)
                .addComponent(jPanelChat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(68, 68, 68)
                .addComponent(jSeparatorInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabelConexao)
                        .addComponent(jLabelStatus)
                        .addComponent(jLabelHops)
                        .addComponent(jLabelNumHops)
                        .addComponent(jLabelHits)
                        .addComponent(jLabelNumHits)
                        .addComponent(jLabelPeer)
                        .addComponent(jLabelNumPeer))
                    .addComponent(jLabelSnake)
                    .addComponent(jLabelGnutella))
                .addGap(20, 20, 20))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(254, 254, 254)
                .addComponent(jTabbedPaneResultadoPesquisa)
                .addGap(126, 126, 126))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your he here:
        this.dispose();
}//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jTextFieldPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldPesquisarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldPesquisarActionPerformed

    private void jButtonPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPesquisarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonPesquisarActionPerformed

    private void jButtonEnviarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEnviarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonEnviarActionPerformed

    private void jButtonPausarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPausarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonPausarActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonCancelar;
    private javax.swing.JButton jButtonEnviar;
    private javax.swing.JButton jButtonPausar;
    private javax.swing.JButton jButtonPausar1;
    private javax.swing.JButton jButtonPesquisar;
    private javax.swing.JComboBox jComboBoxOpcoes;
    private javax.swing.JLabel jLabelConexao;
    private javax.swing.JLabel jLabelGnutella;
    private javax.swing.JLabel jLabelHits;
    private javax.swing.JLabel jLabelHops;
    private javax.swing.JLabel jLabelLogoGSnake;
    private javax.swing.JLabel jLabelNumHits;
    private javax.swing.JLabel jLabelNumHops;
    private javax.swing.JLabel jLabelNumPeer;
    private javax.swing.JLabel jLabelNumVelGeralDownload;
    private javax.swing.JLabel jLabelNumVelGeralUpload;
    private javax.swing.JLabel jLabelPeer;
    private javax.swing.JLabel jLabelPeerOnline;
    private javax.swing.JLabel jLabelSnake;
    private javax.swing.JLabel jLabelStatus;
    private javax.swing.JLabel jLabelSubTitulo;
    private javax.swing.JLabel jLabelSubTitulo2;
    private javax.swing.JLabel jLabelSubTitulo3;
    private javax.swing.JLabel jLabelTitulo;
    private javax.swing.JLabel jLabelUnidadeDown;
    private javax.swing.JLabel jLabelUnidadeUp;
    private javax.swing.JLabel jLabelVelGeralDownload;
    private javax.swing.JLabel jLabelVelGeralUpload;
    private javax.swing.JLayeredPane jLayeredPanePesquisa;
    private javax.swing.JList jListPeerOnline;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JPanel jPanelChat;
    private javax.swing.JPanel jPanelDownload;
    private javax.swing.JPanel jPanelResultadoPesquisa;
    private javax.swing.JPanel jPanelUpload;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPaneDownload;
    private javax.swing.JScrollPane jScrollPanePeerOnline;
    private javax.swing.JScrollPane jScrollPaneResultadoPesquisa;
    private javax.swing.JScrollPane jScrollPaneUpload;
    private javax.swing.JSeparator jSeparatorChat;
    private javax.swing.JSeparator jSeparatorInfo;
    private javax.swing.JTabbedPane jTabbedPaneResultadoPesquisa;
    private javax.swing.JTable jTableDownload;
    private javax.swing.JTable jTableResultadoPesquisa;
    private javax.swing.JTable jTableUpload;
    private javax.swing.JTextArea jTextAreaTexto;
    private javax.swing.JTextField jTextFieldPesquisar;
    private javax.swing.JMenuBar menuBar;
    // End of variables declaration//GEN-END:variables

}
